Skip to content

dgb: wire c2pool-dgb exe to live chain-score path (exe-wire) - #135

Closed
frstrtr wants to merge 1 commit into
dgb/node-implfrom
dgb/exe-wire
Closed

dgb: wire c2pool-dgb exe to live chain-score path (exe-wire)#135
frstrtr wants to merge 1 commit into
dgb/node-implfrom
dgb/exe-wire

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Stacked on #134 (dgb/node-impl). Repairs c2pool-dgb after #134 swapped the skeleton node.cpp for the real abstract dgb::NodeImpl, orphaning run_skeleton/network_summary.

What it does: main_dgb.cpp drives the LIVE header-only chain-score path — constructs dgb::ShareTracker and calls score() (#132/#134), reporting the oracle block_period (75s SSOT). It does not stand up the abstract NodeImpl.

Isolation: node.cpp (real run-loop TU) references core web_server/stratum, which the core OBJECT lib links unconditionally, dragging in payout/merged/hashrate/ltc (Phase B tangle; merged = DOGE aux, NOT in V36 default DGB). So we do NOT compile node.cpp and do NOT link core. We compile core/uint256.cpp directly + link btclibs STATIC util lib (HexStr/HexDigit). Only the c2pool-dgb target changed; c2pool-btc still builds (verified EXIT=0).

Smoke (end-to-end, not just link):

$ c2pool-dgb --selftest
Network: DigiByte (Scrypt-only) identifier=4b62545b1a631afe prefix=1c0553f23ebfcffe block_period=75s share_period=15s chain_length=2880
[selftest] live dgb::ShareTracker constructed; score() driven
[selftest]   score(ZERO) -> chain_len=0 hashrate=0
[selftest]   time_span basis block_period=75s (oracle PARENT.BLOCK_PERIOD, #132 SSOT)
[selftest] OK

chain_len=0/hashrate=0 is the empty-verified-set short-chain early-return; the deep block_period multiply runs once a verified chain >= chain_length exists (Phase B fixtures).

HOLD merge — part of the #129->#131->#132->#134->exe-wire batch (operator-gated).

The exe-wire slice repairs c2pool-dgb after #134 replaced the skeleton
node.cpp with the real abstract dgb::NodeImpl, orphaning the
run_skeleton/network_summary symbols the old stub main linked against.

main_dgb.cpp now drives the LIVE score path: it constructs dgb::ShareTracker
and calls score() (header-only, #132/#134), reporting the oracle block_period
(75s SSOT) the time_span derivation consumes. It never stands up the abstract
NodeImpl, so the full pool run-loop is not pulled in.

Isolation: the real node.cpp TU references core web_server/stratum, which the
core OBJECT lib links unconditionally and which drag in payout/merged/hashrate/
ltc (Phase B self-link tangle; merged = DOGE aux, NOT in the V36 default DGB
build). We therefore do NOT compile node.cpp into the exe and do NOT link core.
Instead we compile core/uint256.cpp directly and link the btclibs STATIC util
lib (HexStr/HexDigit) - pure utility, no pool runtime. Per-coin isolation held;
only the c2pool-dgb target changed; sibling coin exes still build.
@frstrtr

frstrtr commented Jun 18, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #145 (DGB Phase-B batch land #132->#142, operator-approved merge-as-reviewed; content incl. this PR verified present in the batch). Landed to master via #145.

@frstrtr frstrtr closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant